package com.example.asapp.demo.article;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.UUID;

@Service
public class ArticleService {

    @Autowired
    ArticleDao articleDao;

    public List<Article> findAll() {
        return articleDao.findAll();
    }

    public Article saveOne(Article article) {
        return articleDao.save(article);
    }

    public void deleteByPrimary(String id) {
      articleDao.deleteById(id);
    }
}
